package com.jhhc.RHDB.Data.Pojo;

import java.math.BigDecimal;
import java.text.ParseException;
import java.text.SimpleDateFormat;


public class ST_RIVER_R {
    private String stcd;

    private String tm;

    private Double z;

    private Double q;

    private BigDecimal xsa;

    private BigDecimal xsavv;

    private BigDecimal xsmxv;

    private String flwchrcd;

    private String wptn;

    private String msqmt;

    private String msamt;

    private String msvmt;
    private String data;
    private String data1;
    private String month1;
    private String month2;
    public String getStcd() {
        return stcd;
    }

    public void setStcd(String stcd) {
        this.stcd = stcd == null ? null : stcd.trim();
    }

    public String getTm() {
        return tm;
    }

    public void setTm(String tm) {
        this.tm = tm;
    }

    public Double getZ() {
        return z;
    }

    public void setZ(Double z) {
        this.z = z;
    }

    public Double getQ() {
        return q;
    }

    public void setQ(Double q) {
        this.q = q;
    }

    public BigDecimal getXsa() {
        return xsa;
    }

    public void setXsa(BigDecimal xsa) {
        this.xsa = xsa;
    }

    public BigDecimal getXsavv() {
        return xsavv;
    }

    public void setXsavv(BigDecimal xsavv) {
        this.xsavv = xsavv;
    }

    public BigDecimal getXsmxv() {
        return xsmxv;
    }

    public void setXsmxv(BigDecimal xsmxv) {
        this.xsmxv = xsmxv;
    }

    public String getFlwchrcd() {
        return flwchrcd;
    }

    public void setFlwchrcd(String flwchrcd) {
        this.flwchrcd = flwchrcd == null ? null : flwchrcd.trim();
    }

    public String getWptn() {
        return wptn;
    }

    public void setWptn(String wptn) {
        this.wptn = wptn == null ? null : wptn.trim();
    }

    public String getMsqmt() {
        return msqmt;
    }

    public void setMsqmt(String msqmt) {
        this.msqmt = msqmt == null ? null : msqmt.trim();
    }

    public String getMsamt() {
        return msamt;
    }

    public void setMsamt(String msamt) {
        this.msamt = msamt == null ? null : msamt.trim();
    }

    public String getMsvmt() {
        return msvmt;
    }

    public void setMsvmt(String msvmt) {
        this.msvmt = msvmt == null ? null : msvmt.trim();
    }

    public String getData() {

        // System.out.println( setData());

        return  setData();
    }

    public String setData() {
        String data = getTm();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); // 日期格式转换 天
        try {
            String day  =format.format(format.parse(data));
            return day;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getData1() {

        return setData1();
    }

    public String setData1() {
        String data1 = getTm();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 日期格式转换 小时
        try {
            String day  = format.format(format.parse(data1)).substring(11,16);
            return day;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getMonth1() {

        return setMonth1();
    }

    public String setMonth1() {
        String month1 = getTm();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 日期格式转换 月份
        try {
            String day  = format.format(format.parse(month1)).substring(8,16);
            String day1  = format.format(format.parse(month1)).substring(11,16);
            String day2  = format.format(format.parse(month1)).substring(14,16);
            if (day1.equals("08:00")&&day2.equals("00")){
                return day;
            }
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return "";
    }

    public String getMonth2() {

        return setMonth2();
    }

    public String setMonth2() {
        String month1 = getTm();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 日期格式转换 月份
        try {
            String day  = format.format(format.parse(month1)).substring(8,10);
            return day;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getMonth() {

        return setMonth();
    }

    public String setMonth() {
        String month1 = getTm();
        SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 日期格式转换 月份
        try {
            String day  = format.format(format.parse(month1)).substring(0,7);
            //  System.out.println(day);
            return day;
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }

    @Override
    public String toString() {
        return "ST_RIVER_R{" +
                "stcd='" + stcd + '\'' +
                ", tm='" + tm + '\'' +
                ", z=" + z +
                ", q=" + q +
                '}';
    }
}